import Vue from 'vue'
import Router from 'vue-router'
import bus from 'emitvue';
Vue.use(Router)


let router = new Router({
    routes: [
        {
            path: '/autoTest',
            name: 'autoTest',
            component: require('@/components/AutoTest').default
        },
        {
            path: '/contextParse',
            name: 'contextParse',
            component: require('@/components/ContextParse').default
        },
        {
            path: '*',
            redirect: '/autoTest'
        },
    ]
})

bus.$on('autoTest', function () {
    router.push({name: 'autoTest'});
})

bus.$on('contextParse', function () {
    router.push({name: 'contextParse'});
})

export default router;
